-- GENERATED SPELL FOR [Arcane Fiend] --


function spell0_18429(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(15253,pUnit)
pUnit:RegisterEvent('Sorts_18429', 1500, 1)
end

function spell1_18429(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(33860,pUnit)
pUnit:RegisterEvent('Sorts_18429', 1500, 1)
end

function spell2_18429(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18429', 15305, 1)
end

function Sorts_18429(pUnit, Event)
local choix_sorts_18429 = math.random(0, 2)
if choix_sorts_18429 == 0 then
pUnit:RegisterEvent('spell0_18429', 1, 1)
end
if choix_sorts_18429 == 1 then
pUnit:RegisterEvent('spell1_18429', 1, 1)
end
if choix_sorts_18429 == 2 then
pUnit:RegisterEvent('spell2_18429', 1, 1)
end
end

function mob18429_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18429', math.random(1500, 3000), 1)
end

function mob18429_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18429_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18429_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18429, 1, 'mob18429_Action')
RegisterUnitEvent(18429, 2, 'mob18429_Leave')
RegisterUnitEvent(18429, 3, 'mob18429_Kill')
RegisterUnitEvent(18429, 4, 'mob18429_Die')
